import QtQuick 2.0
import QtQuick.Layouts 1.3
import QtQuick.Controls 2.3
import Quick.UIComponent.Text.Normal  0.1
import Quick.SystemComponent.FontLoader 0.1


ToolBar{
    id:root
    property alias  title: tt.text
    property  alias rightSource:rightSource.icon.source
    property  alias leftSource:left.icon.source

    signal leftClicked
    signal rightClicked


    RowLayout {
        anchors.fill: parent
        ToolButton {
          id:left
          onClicked: {
              emit:leftClicked()
          }
          icon.source: "qrc:/image/icon/svg/return.svg"
        }
        MText {
          id:tt
          text: "Title"
          elide: Label.ElideRight
          horizontalAlignment: Qt.AlignHCenter
          verticalAlignment: Qt.AlignVCenter
          Layout.fillWidth: true
          pxSize: 28
          fontFamily: Family.normal.name
          textColor: "#1573C5"
        }
        ToolButton {
            id:rightSource
          icon.source:"qrc:/image/icon/svg/menu.svg"
          onClicked: {
                emit:rightClicked()
          }
        }
    }

}

